//
//  RGMeInterfaceBulider.m
//  
//
//  Created by wuyine on 2019/1/3.
//

#import "RGMeInterfaceBulider.h"

@implementation RGMeInterfaceBulider
//编辑信息
+(NSDictionary *)buildEditInfo:(RGUserInfoModel *)model {
    NSMutableDictionary *dic = [HttpInterfaceBulider buildBaseParams];
        [dic setObject:SafeStr([RGUserInfoModel getUserInfo].token) forKey:@"token"];
    [dic setObject:SafeStr(model.nickname) forKey:@"nickname"];
    [dic setObject:SafeStr(model.userCode) forKey:@"userCode"];
    [dic setObject:SafeStr(model.userComment) forKey:@"userComment"];
    [dic setObject:SafeStr(model.schoolName) forKey:@"school"];
    [dic setObject:@(model.sex) forKey:@"sex"];
    [dic setObject:SafeStr(model.birthday) forKey:@"birthday"];
    [dic setObject:SafeStr(model.locality) forKey:@"locality"];
    return [dic copy];
}

//收藏列表
+(NSDictionary *)buildCollectionListWithPageNumber:(NSInteger)pageNumber pageSize:(NSInteger)pageSize {
    NSMutableDictionary *dic = [HttpInterfaceBulider buildBaseParams];
        [dic setObject:SafeStr([RGUserInfoModel getUserInfo].token) forKey:@"token"];
    [dic setObject:@(pageNumber) forKey:@"pageNumber"];
    [dic setObject:@(pageSize) forKey:@"pageSize"];
    return [dic copy];
}

//好友推荐
+ (NSDictionary *)buildRecommendUserWithPageNumber:(NSInteger)pageNumber pageSize:(NSInteger)pageSize {
    NSMutableDictionary *dic = [HttpInterfaceBulider buildBaseParams];
    [dic setObject:SafeStr([RGUserInfoModel getUserInfo].token) forKey:@"token"];
    [dic setObject:@(pageNumber) forKey:@"pageNumber"];
    [dic setObject:@(pageSize) forKey:@"pageSize"];
    return [dic copy];
}

//用户个人信息
+ (NSDictionary *)buildUserInfo:(NSInteger)id {
    NSMutableDictionary *dic = [HttpInterfaceBulider buildBaseParams];
    [dic setObject:SafeStr([RGUserInfoModel getUserInfo].token) forKey:@"token"];
    [dic setObject:@(id) forKey:@"id"];
    return [dic copy];
}

//作品
+ (NSDictionary *)buildUserWorks:(NSInteger)userId WithPageNumber:(NSInteger)pageNumber pageSize:(NSInteger)pageSize {
    NSMutableDictionary *dic = [HttpInterfaceBulider buildBaseParams];
    [dic setObject:@(userId) forKey:@"id"];
    [dic setObject:SafeStr([RGUserInfoModel getUserInfo].token) forKey:@"token"];
    [dic setObject:@(pageNumber) forKey:@"pageNumber"];
    [dic setObject:@(pageSize) forKey:@"pageSize"];
    return [dic copy];
}

//动态
+ (NSDictionary *)buildUserDynamic:(NSInteger)userId WithPageNumber:(NSInteger)pageNumber pageSize:(NSInteger)pageSize {
    NSMutableDictionary *dic = [HttpInterfaceBulider buildBaseParams];
    [dic setObject:@(userId) forKey:@"id"];
    [dic setObject:SafeStr([RGUserInfoModel getUserInfo].token) forKey:@"token"];
    [dic setObject:@(pageNumber) forKey:@"pageNumber"];
    [dic setObject:@(pageSize) forKey:@"pageSize"];
    return [dic copy];
}

//喜欢
+ (NSDictionary *)buildUserLoves:(NSInteger)userId WithPageNumber:(NSInteger)pageNumber pageSize:(NSInteger)pageSize {
    NSMutableDictionary *dic = [HttpInterfaceBulider buildBaseParams];
    [dic setObject:@(userId) forKey:@"id"];
    [dic setObject:SafeStr([RGUserInfoModel getUserInfo].token) forKey:@"token"];
    [dic setObject:@(pageNumber) forKey:@"pageNumber"];
    [dic setObject:@(pageSize) forKey:@"pageSize"];
    return [dic copy];
}

//邀请码
+ (NSDictionary *)buildInvitationCode:(NSString *)invitationCode  {
    NSMutableDictionary *dic = [HttpInterfaceBulider buildBaseParams];
    [dic setObject:SafeStr(invitationCode) forKey:@"verificationCode"];
    [dic setObject:SafeStr([RGUserInfoModel getUserInfo].token) forKey:@"token"];
    
    return [dic copy];
}
@end
